<?php
//header("Content-type: image/png");
//Zend_Loader::loadClass("pChart/pChart/pData.class.php");
//Zend_Loader::loadClass("pChart/pChart/pChart.class.php");
include(APPLICATION_LIBRARY . "/pChart/pChart/pData.class.php");
include(APPLICATION_LIBRARY . "/pChart/pChart/pChart.class.php");

class Application_Canvas_Charts_TestChart extends pChart
{
	protected $DataSet;
	protected $Test;
	public function __construct() {

	    // Dataset definition
		$DataSet = new pData;
		$DataSet->AddPoint(array(1,4,-3,2,-3,3,2,1,0,7,4,-3,2,-3,3,5,1,0,7),"Serie1");
		$DataSet->AddAllSeries();
		$DataSet->SetAbsciseLabelSerie();
		$DataSet->SetSerieName("January","Serie1");
		
		// Initialise the graph
		$Test = new pChart(300,300);
		$Test->setFontProperties("Fonts/tahoma.ttf",8);
		$Test->drawFilledRoundedRectangle(2,2,98,28,2,230,230,230);
		$Test->setGraphArea(5,5,95,25);
		$Test->drawGraphArea(255,255,255);
		$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,220,220,220,FALSE);
		
		// Draw the line graph
		$Test->drawLineGraph($DataSet->GetData(),$DataSet->GetDataDescription());

		// Finish the graph
		//$Test->Render("SmallGraph.png");
	}
	
	
		//$Test->Render(null);
		
		//$Test->Stroke();
		
	
}	